package com.mall.seckill_mall.exception;

import com.mall.seckill_mall.enums.CodeMessage;

public class UserException extends RuntimeException {

    private int code;

    public UserException(CodeMessage codeMessage) {
        super(codeMessage.getMessage());
        this.code = codeMessage.getCode();
    }

    public int getCode() {
        return code;
    }
}
